package com.chenxin.system.service.impl;

import com.chenxin.system.domain.InterfaceLog;
import com.chenxin.system.mapper.InterfaceLogMapper;
import com.chenxin.system.service.IInterfaceLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 接口日志Service业务层处理
 *
 * @author gry
 * @date 2025-04-21
 */
@Service
public class InterfaceLogServiceImpl implements IInterfaceLogService {
    @Autowired
    private InterfaceLogMapper interfaceLogMapper;

    /**
     * 查询接口日志
     *
     * @param apiId 接口日志主键
     * @return 接口日志
     */
    @Override
    public InterfaceLog selectApiLogByApiId(Long apiId) {
        return interfaceLogMapper.selectApiLogByApiId(apiId);
    }

    /**
     * 查询接口日志列表
     *
     * @param apiLog 接口日志
     * @return 接口日志
     */
    @Override
    public List<InterfaceLog> selectApiLogList(InterfaceLog apiLog) {
        return interfaceLogMapper.selectApiLogList(apiLog);
    }

    /**
     * 新增接口日志
     *
     * @param apiLog 接口日志
     * @return 结果
     */
    @Override
    public int insertApiLog(InterfaceLog apiLog) {
        return interfaceLogMapper.insertApiLog(apiLog);
    }
}
